﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <style>
        body{
            text-align: -webkit-center;
        }
        pre{
            text-align: left;
        }

        .flow{
            max-width: 1000px;
            text-align: center;
            margin: 50px 0px 50px 0px;
        }
    </style>
    <script src="js" type="text/javascript"></script>
</head>
<body>

    <div class="container-fluid">
        <div class="row">
            <div class="flow">

                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">刷登录的</h3>
                    </div>
                    <div class="panel-body">
                        <pre>
                            <code id="login">


    function loginpost(username,password) {
        var pubkey='-----BEGIN PUBLIC KEY-----';
        pubkey+='MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbJ2QYNdiFlzE0mcyq7tcZc5dP';
        pubkey+='vof6696l2cJJM8kOxeXT8EonfvLzfsEGmwjNp3gvAyF14LvqT6w7oH40sFFnX358';
        pubkey+='Eb+HZXx6CZ4LOkaTW0KNS6yodsRv0uwJhFMwREqEVbqd6jcCxTGKDOieendC8x1f';
        pubkey+='sg3Muagyfawc+o+tewIDAQAB';
        pubkey+='-----END PUBLIC KEY-----';

        // 利用公钥加密
        var encrypt = new JSEncrypt();
        encrypt.setPublicKey(pubkey);
        var upass = encrypt.encrypt(decodeURIComponent(password));
        this.login=()=> {
            try{
                $.post("http://yn.chinavolunteer.cn/app/user/login.php?m=login",{
                    uname:decodeURIComponent(username),
                    upass:upass,
                    referer:"http%3A%2F%2Fyn.chinavolunteer.cn%2Fapp%2Fuser%2Fhome.php"

                },(data)=>console.log(data));
            }catch(ex){
                loginpost(username,password);
            }
        };

    }



    //登录，用户名密码
    //var m1=new loginpost("输入用户名","输入密码");

    //举例：用户名密码都是 test1
    var m1=new loginpost("test1","test1");

    //刷到服务器有http status 200的响应为止
    m1.login();


                            </code>
                        </pre>


                    </div>
                </div>


                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">刷注册的（ES6）</h3>
                    </div>
                    <div class="panel-body">
                        <pre>
                            <code id="register">

    //注册

    class register{


        constructor(username,password,name,id,num){

            this.username=username;
            this.passowd=password;
            this.name=encodeURIComponent(name);
            this.id=id;
            this.num=num;
        }


        register(){

            try{
                $.post("http://yn.chinavolunteer.cn/app/user/register.php?m=reg_vol",
                    {
                        login_name:this.username,
                        login_name_repeat:this.username,
                        login_pass:this.passowd,
                        login_pass_repeat:this.passowd,
                        login_email:"ybjaaWork%40163.com",
                        login_email_repeat:"ybjaaWork%40163.com",
                        vol_true_name:this.name,
                        vol_cert_number:this.id,
                        gender:  parseInt(this.id.substr(16,1))%2,
                        login_mobile:this.num,
                        vol_address:"%E6%B3%B0%E5%AE%89%E8%B7%AF",
                        postcode:null,
                        vol_student_flag:0,
                        college_input:null,
                        college1:null,
                        college2:null,
                        college3:null,
                        vol_student_number:null,
                        vol_public_flag:1,
                        stag_vol:"%E5%8C%BB%E7%96%97%E5%8D%AB%E7%94%9F",
                        stag_vol_val:null,
                        stype_vol:23392,
                        vol_nationality:4544,
                        vol_cert_type:4529,
                        vol_reg_year:this.id.substr(6,4),
                        vol_reg_month:this.id.substr(10,2),
                        vol_reg_day:this.id.substr(12,2),
                        vol_political:4846,
                        vol_ethnicity:4788,
                        nat_district1:null,
                        nat_district2:null,
                        nat_district3:null,
                        nat_district4:null,
                        house_district1:8474,
                        house_district2:8475,
                        house_district3:null,
                        house_district4:null,
                        vol_edu_degree:4537,
                        vol_job_title:23265,
                        graduate_year:null,
                        district1:8474,
                        district2:8475,
                        district3:null,
                        district4:null,
                        service_type:[23392]
                    },(data)=> console.log(data))
            }catch (ex){
                this.register();
            }



        }

    }

    //a1=new register("填写用户名","填写密码","填写姓名","填写身份证",手机号（这个不加“”）);

    //举例子

    a1=new register("test01","password","我是姓名","530001198712121115",13912345678);

    //这行代码是直到注册成功或者服务器返回某些信息填错，如果是网络问题会重复注册，直到成功
    a1.register();

                            </code>
                        </pre>


                    </div>
                </div>


                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">刷75小时的（需在基本信息页面）</h3>
                    </div>
                    <div class="panel-body">
                        <pre>
                            <code>



    //刷75小时的
    function edit_vol(){
        var marea='#vol_info';
        var mdiv=$(marea);
        var postdata=C.form.get_form(marea);
        postdata['service_type']=[];
        $("input[name='stype_vol']:checkbox").each(function(){
            if($(this).attr("checked")){
                var user_type1=$(this).val();
                var user_type2=$(this).parent().parent().find('select').val();
                postdata['service_type'].push([user_type1,user_type2]);
            }
        });

        postdata.vol_pre_hour="75";

        try{
            $.post('info.vol.php?m=edit_vol', postdata, function(data) {
                console.log(data);
                try {
                    var ret = $.evalJSON(data);
                    if(ret.code=='1'){
                        mdiv.find("#"+ret.id).focus();
                        mdiv.find("#"+ret.id).parent().parent().find('.v_result').html(ret.msg);
                        mdiv.find("input[name='"+ret.id+"']").eq(0).focus();
                        mdiv.find("input[name='"+ret.id+"']").parent().parent().find('.v_result').html(ret.msg);
                        $('#'+ret.tab).click();
                    }else{
                        C.alert.show(ret.msg);
                    }
                } catch (e) {
                    C.alert.show('error:'+data);
                }
            });
        }catch (ex){
            edit_vol();
        }


    }


                            </code>
                        </pre>


                    </div>
                </div>



                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">批量导出信息</h3>
                        <h3>登录即可</h3>
                    </div>
                    <div class="panel-body">
                        <pre>
                            <code>




    //1.获取人员UID
    (function () {

        let users=[];

        getJoin2=(p)=> {
            let url="http://yn.chinavolunteer.cn/app/org/member.php";
            try{


                $.get(url+"?p="+p,
                    (data)=> {
                        let table= $(data).find(".table1")[0];
                        let trs=table.getElementsByTagName("tr");
                        let len=trs.length;

                        if(len<=1) {
                            page=0;
                            console.log("完成了");
                            console.log(getUsersStr());
                            return;
                        };

                        for(let i=1;i < len;i++){
                            let user=new Object();
                            user.uid=trs[i].getElementsByTagName("td")[0].children[0].value;
                            user.zyzbh=trs[i].getElementsByTagName("td")[2].children[2].innerText;

                            user.username=trs[i].getElementsByTagName("td")[1].innerText;
                            user.name=trs[i].getElementsByTagName("td")[2].children[0].innerText;



                            user.dhhm=trs[i].getElementsByTagName("td")[3].innerText.split("\n")[0];


                            users.push(user);
                        }

                        console.log(p);
                        getJoin2(++p);


                    });
            }catch (ex){
                getJoin2(p);
            }
        };

        getUsersStr=()=>{ return users.map((u)=>{ let str="";  for(let p in u){str+=u[p]+"\t";} return str;}).join("\r\n"); };


        getJoin2(1);

    })();

                            </code>
                        </pre>


                    </div>
                </div>




                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">批量导UID</h3>
                        <h3>（需要在http://yn.chinavolunteer.cn/app/org/member.php页面刷）</h3>
                        <h3>（人数少于50人的自动忽略这一行）貌似一页50人，有翻页的必须每一页都刷脚本才行,输出的数据是每一页的，需要手动合并（每页刷一次）</h3>
                    </div>
                    <div class="panel-body">
                        <pre>
                            <code>



    //1.获取人员UID
    (function () {
        let uid=[];

        let trs=document.getElementsByClassName("table1")[0].getElementsByTagName("tr");

        let len=trs.length;

        let users=[];

        for(let i=1;i< len;i++){
            console.log(trs[i]);
            let user=new Object();
            user.uid=trs[i].getElementsByTagName("td")[0].children[0].value;
            users.push(user);
        }

        uid=users.map((user)=>user.uid).join(",");

        console.log(uid);

    })();

                            </code>
                        </pre>


                    </div>
                </div>


                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">批量将本团体的所有人员都加入所有活动</h3>
                        <h3>（需要在http://yn.chinavolunteer.cn/app/opp/opp.my.php页面刷）</h3>
                        <h3></h3>
                    </div>
                    <div class="panel-body">
                        <pre>
                            <code>



     function project() {

        //下面的uid是大理市人社局局机关相关人员的uid，各单位需要自己填写个单位人员自己的uid（uid刷楼上那一段脚本获取）
        删除这段废话才能运行（你看得懂的中国字，注意上面那段文字）


        let uid=[
            38084284,38108800,38093609,38099512,37902327,38088755,38078393,38084424,
            38082700,37971084,37946709,37925755,37914146,37912644,37911767,37904181,
            37901130,21194893,37895092,37800094,37806104,37894048,37893215,37876635,
            37869356,37728628,37742062,37726238,37777471,37748249,37730340,37732374,
            37729158,37728289,37728568,37727223,37724991,37724302,37723483,37723157,
            37722849,37722442,37656301
        ];


        let postJoin=(url)=> {

            let newurl=url.replace(/&manage[^&]*/,"");
            let parent=this;
          //  "http://yn.chinavolunteer.cn/app/opp/opp.my.php?m=invite&item=recruit&opp_id=802236&job_id=1064889"
          //  "http://yn.chinavolunteer.cn/app/opp/opp.my.php?item=recruit&job_id=1064889&opp_id=802236&item=recruit&manage_type=0"
            try{
                $.post(newurl+"&m=invite",
                    {
                        stype:"local",
                        uid:uid
                    },(data)=> console.log(data))
            }catch (ex){
                postJoin();
            }
        };


        let getProjects=()=>{

            let as=document.getElementsByTagName("a");

            let zm=[];

            for(let a of as)
            {
               if(a.innerText&&  a.innerText=="招募")
               {
                   zm.push(a);
               }
            }


            zm.forEach((a)=>postJoin(a.href))

        }


        this.start=()=> getProjects();



    };

     p1=new project();
     p1.start();

                            </code>
                        </pre>


                    </div>
                </div>



                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">批量将活动的人员都添加对应的时长（下面地址所列出的所有活动）</h3>
                        <h3>（需要在http://yn.chinavolunteer.cn/app/opp/opp.my.php页面刷）</h3>
                        <h3></h3>
                    </div>
                    <div class="panel-body">
                        <pre>
                            <code>



     //  操作时长

    function projectTime(hour,memo) {

         //下面的uid是大理市人社局局机关相关人员的uid，各单位需要自己填写个单位人员自己的uid（uid刷楼上的楼上那一段脚本获取）
        删除这段废话才能运行（你看得懂的中国字，注意上面那段文字）

        let uid=[
            38084284,38108800,38093609,38099512,37902327,38088755,38078393,38084424,
            38082700,37971084,37946709,37925755,37914146,37912644,37911767,37904181,
            37901130,21194893,37895092,37800094,37806104,37894048,37893215,37876635,
            37869356,37728628,37742062,37726238,37777471,37748249,37730340,37732374,
            37729158,37728289,37728568,37727223,37724991,37724302,37723483,37723157,
            37722849,37722442,37656301
        ];


        let postJoin=(url)=> {

            let newurl=url;//url.replace(/&m=invite[^&]*|m=invite[^&]*&/,"");
            let parent=this;
            try{
                $.post(newurl+"&m=save_hour",
                    {
                        hour_num:hour,
                        memo:encodeURIComponent(memo),
                        uid:uid
                    },(data)=> console.log(data))
            }catch (ex){
                postJoin();
            }
        };


        let getProjects=()=>{

            let as=document.getElementsByTagName("a");

            let zm=[];

            for(let a of as)
            {
                if(a.innerText&&  a.innerText=="记时")
                {
                    zm.push(a);
                }
            }


            zm.forEach((a)=>postJoin(a.href))

        }


        this.start=()=> getProjects();



    };

    //注意下面两个参数
    //3代表每人3小时
    //后面那个字符串表示填写的内容
    //举个栗子：
    //p1=new projectTime(3,"8:00-11:00");
    //代表每人刷3小时，备注为 "8:00-11:00" (注意不要删除")

    删除这行废话才能运行（你看得懂的中国字，注意上面那段文字，上面的而文字不用删）

    //不改参数默认3小时，备注 8:00-11:00
    p1=new projectTime(3,"8:00-11:00");     //参数是修改这一行的参数

    p1.start();

                            </code>
                        </pre>


                    </div>
                </div>



                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">批量得出志愿者信息(市创建办专用)</h3>
                        <h3>登录即可</h3>
                        <h3></h3>
                    </div>
                    <div class="panel-body">
                        <pre>
                            <code>



     //批量导出信息



    function getAllUsers() {

        users=[];
        flag=true;
        page=0;

        //errorIndex=8476;

        //vol_street=8476
        this.select="&vol_street=8475";

        getAllUsers.prototype.getJoin=(p)=> {
            let url="http://yn.chinavolunteer.cn/app/sys/vol.list.php";
            let newurl=url;//url.replace(/&m=invite[^&]*|m=invite[^&]*&/,"");
            let parent=this;
            try{


                $.get(newurl+"?p="+p+this.select,
                    (data)=> {
                        let table= $(data).find(".table1")[0];
                        let trs=table.getElementsByTagName("tr");
                        let len=trs.length;

                        if(len<=1) {
                            page=0;
                            console.log("完成了");

                            /*if(errorIndex!=8486)
                            {
                                errorIndex++;
                                getJoin(1);
                            }*/

                            return;
                        }

                        for(let i=1;i < len ; i++){
                            let user=new Object();
                            user.uid=trs[i].getElementsByTagName("td")[0].children[0].value;
                            user.zyzbh=trs[i].getElementsByTagName("td")[1].innerText.split("\n")[1];

                            user.username=trs[i].getElementsByTagName("td")[1].innerText.split("\n")[0];
                            user.name=trs[i].getElementsByTagName("td")[2].children[0].innerText;



                            user.dhhm=trs[i].getElementsByTagName("td")[3].innerText.split("\n")[0];

                            user.jjz=trs[i].getElementsByTagName("td")[6].innerText;
                            user.sc=trs[i].getElementsByTagName("td")[9].innerText;

                            user.error=8475;

                            users.push(user);
                        }

                        console.log(p);
                        page=p;
                        if(!flag){
                            return;
                        }
                        this.getJoin(++p);


                    }).fail(()=>{
                        console.log("fail");
                        this.getJoin(p);
                });
            }catch (ex){
                this.getJoin(p);
            }
        };


        getAllUsers.prototype.getJoin2=(p)=> {
            let url="http://yn.chinavolunteer.cn/app/sys/vol.list.php";
            let newurl=url;//url.replace(/&m=invite[^&]*|m=invite[^&]*&/,"");
            let parent=this;
            try{


                $.get(newurl+"?p="+p,//+this.select,
                    (data)=> {
                        let table= $(data).find(".table1")[0];
                        let trs=table.getElementsByTagName("tr");
                        let len=trs.length;

                        if(len<=1) return;

                        for(let i=1;i < len ; i++){
                            let user=new Object();
                            user.uid=trs[i].getElementsByTagName("td")[0].children[0].value;
                            user.zyzbh=trs[i].getElementsByTagName("td")[2].children[2].innerText;

                            user.username=trs[i].getElementsByTagName("td")[1].innerText;
                            user.name=trs[i].getElementsByTagName("td")[2].children[0].innerText;



                            user.dhhm=trs[i].getElementsByTagName("td")[3].innerText.split("\n")[0];


                            users.push(user);
                        }

                        console.log(p);
                        page=p;
                        if(!flag){
                            return;
                        }
                        this.getJoin2(++p);


                    });
            }catch (ex){
                this.getJoin2(p);
            }
        };


        let getProjects=(p=1)=>{

            this.getJoin(p);

        };

        getAllUsers.prototype.getUsersStr=()=>{ return users.map((u)=>{ let str="";  for(let p in u){str+=u[p]+"\t";} return str;}).join("\r\n"); };

        getAllUsers.prototype.getUsers=()=>users;


        getAllUsers.prototype.start=()=> getProjects();

        getAllUsers.prototype.resume=()=>{flag=true; getProjects(page);};

        getAllUsers.prototype.stop=()=>{flag=false; };




    };

    p1=new getAllUsers();
    p1.start();

    us2=p1.getUsers().map((u)=>{ let str=""; for(let p in u){str+=u[p]+"\t";} return str;});
    console.log(p1.getUsers().map((u)=>{ let str=""; for(let p in u){str+=u[p]+"\t";} return str;}).join("\r\n"));







                            </code>
                        </pre>


                    </div>
                </div>


                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">每天刷111分</h3>
                        <h3>登录即可</h3>
                        <h3></h3>
                    </div>
                    <div class="panel-body">
                        <pre>
                            <code>

    //把速度降下来一些，基本3s左右完事儿,并在结束后给出提示（以前太快导致结束了积分没刷上，还得从刷）
    //修复：HTML显示<span>&time</span>错误的问题;

    //优化：代码走OOP


    //减速减速在减速，神经病网站，减速到12秒
    //神经病网站，不会做线程同步或者数据库事物啊

    (function () {

        var count = 0;




        function countAdd(str) {


            if (str==="end"){
                console.log("刷完了");
            } else
            {
                count++;
                console.log(str + ":" + count);
            }
        }

        var integral = function () {

            integral.prototype.time=1100;

            this.funcArray=null;


            var r1 = /userAccount":"([0-9]*)"/;
            var r2 = /domainCode":"([0-9]*)"/;

            var s2 = decodeURIComponent(document.cookie ? document.cookie : "");

            this.userAccount = r1.exec(s2) ? r1.exec(s2)[1] : "";
            this.domainCode = r2.exec(s2) ? r2.exec(s2)[1] : "";


            integral.prototype.delegate=function (str) {
                countAdd(str);
                this.start();
            }



            //刷答题分的
            integral.prototype.f1= function() {
                var parent = this;

                try {
                    $.post("http://xf.faxuan.net/pss/service/postPoint?operateType=epoint" +
                        "&userAccount=" + this.userAccount +
                        "&domainCode=" + this.domainCode +
                        "&"+"timestamp=" + new Date() +
                        "&exerScore=2" +
                        "&expointValue=20", () => {parent.delegate("刷分的");})
                        .fail(() => {
                            parent.f1();
                    });
                } catch (ex) {
                    parent.f1();
                }
            }

            //刷10分钟的
            integral.prototype.f2=function() {
                var parent = this;

                try {
                    $.get("http://xf.faxuan.net/pss/service/postPoint?operateType=spoint" +
                        "&userAccount=" + this.userAccount +
                        "&domainCode=" + this.domainCode +
                        "&"+"timestamp=" + new Date() +
                        "&stime=88",
                        () => parent.delegate("刷10分钟的"))
                        .fail(() => {
                            parent.f2();
                    });
                } catch (ex) {
                    parent.f2();
                }
            }

            //刷登录的
            integral.prototype.f3=function() {
                var parent = this;

                try {
                    $.get("http://xf.faxuan.net/pss/service/postPoint?operateType=lpoint" +
                        "&userAccount=" + this.userAccount +
                        "&domainCode=" + this.domainCode +
                        "&"+"timestamp=" + new Date(),
                        () => parent.delegate("刷登录的"))
                        .fail(() => {
                            parent.f3();
                    });
                } catch (ex) {
                    parent.f3();
                }
            }

            //刷1分的
            integral.prototype.f4=function() {
                var parent = this;
                try {
                    $.get("http://xf.faxuan.net/pss/service/postPoint?operateType=ipoint" +
                        "&userAccount=" + this.userAccount +
                        "&domainCode=" + this.domainCode +
                        "&"+"timestamp=" + new Date(),
                        () => parent.delegate("刷1分的"))
                        .fail(() => {
                            parent.f4();
                    });
                } catch (ex) {
                    parent.f4();
                }
            }

            integral.prototype.start=function () {
                if(this.funcArray===null) {
                    this.funcArray=[];
                    Array.prototype.push.call(this.funcArray,this.f1,this.f2,this.f3,this.f4);
                }
                if(this.funcArray.length>0) {
                    setTimeout(()=>this.funcArray.shift().apply(this),this.time);
                }
                else {
                    start();
                }






            }


        }


        var total=3;

        function start() {
            if(total>0) {
                total--;
                new integral().start();
            }else {
                console.log("刷完了")
            }
        }
        start();

        /*//刷三次
        new integral().start();
        setTimeout(()=>new integral().start(),1100);
        setTimeout(()=>new integral().start(),2200);*/


    })();








                            </code>
                        </pre>


                    </div>
                </div>




            </div>
        </div>

    </div>








    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="js/jb.js"></script>

</body>
</html>